determine three points are vertices of right triangle using slope